package com.sikaryofficial.backend.domain.mapping;

import com.sikaryofficial.backend.domain.dto.resp.ProtocolDTO;
import com.sikaryofficial.backend.domain.entity.UserProtocol;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 协议映射
 * @date : 2023/11/03 9:19
 */
@Mapper
public interface ProtocolMapping {
    ProtocolMapping INSTANCE = Mappers.getMapper(ProtocolMapping.class);

    /**
     * 实体映射resp
     *
     * @param protocol
     * @return
     */
    ProtocolDTO coverToResp(UserProtocol protocol);

    /**
     * 实体集合映射resp
     *
     * @param protocols
     * @return
     */
    List<ProtocolDTO> coverListToResp(List<UserProtocol> protocols);
}
